﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PayloadTracker.APRS.Parsers
{

    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public sealed class ParserName : System.Attribute
    {
        string m_Name;
        public ParserName(string name)
        {
            m_Name = name;
        }
        public string  Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }

    }

    /// <summary>
    /// Base interface for a parser that returns APRS data.
    /// </summary>
    public abstract class IParser
    {
        /// <summary>
        /// Parsing function
        /// </summary>
        /// <param name="sentence">string to parse for an APRSBeacon</param>
        /// <returns>APRSBeacon contained within the sentence.</returns>
        public abstract APRSBeacon Parse(string sentence);
        public abstract bool IsValidSentance(string sentence);
    }
}
